package com.rongmei.jdsync.dto;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.HashMap;
import java.util.Map;

/**
 * SKU详细信息数据传输对象
 */
@Data
@Schema(description = "SKU详细信息")
public class SkuDetailDto {
    // 使用Map存储动态属性，如"spec_id:-91180"
    private Map<String, String> specDetails = new HashMap<>();

    @JsonAnyGetter
    public Map<String, String> getSpecDetails() {
        return specDetails;
    }

    @JsonAnySetter
    public void setSpecDetail(String name, String value) {
        specDetails.put(name, value);
    }
}
